const express = require('express');
const app = express();
app.all('/home', (request, response) => {
    // 响应一个页面
    response.sendFile(__dirname + '/10-index.html');
})
app.all('/data', (request, response) => {
    response.setHeader('Access-Control-Allow-Origin', '*');
    response.send('同源策略');
})
app.listen(9000, () => {
    console.log('服务已经启动...')
})